import {longRequest, request} from '@/utils'

export default {
  // 管理员
  // 登录
  login: (data) => request.post('/admin/login', data, { noNeedToken: true }),
  register: (data) => request.post('/admin/register', data, { noNeedToken: true }),
  // 添加管理员
  addAdmin: (data) => request.post('/admin/save', data),
  // 删除某个用户
  deleteAdmin: (data) => request.post('/admin/delete', data),
  // 删除多个用户
  deleteAdmins: (data) => request.get('/admin/deleteBatch', data),
  //更新产品属性
  updateAdmin:(data) => request.post('/admin/update',data),
  // 获取管理员总数
  adminCount: () => request.get('/admin/count', { noNeedToken: true }),
  // 获取管理员总数
  adminCountNeedToken: () => request.get('/admin/count'),

  // 获取管理员信息
  getAccount: () => request.get('/admin/account'),
  //获取所有的管理员信息
  findAllAdmin: () => request.get('/admin/findAll'),
  //根据角色获取所有的管理员信息
  findAdminByRole: (data) => request.post('/admin/findAdminByRole', data),
  // 分页查询管理员
  findPageAdmin: (data) => request.get('/admin/findPage', data),
  // 导出管理员信息
  exportAdminList: (data) =>
    longRequest({
      url: '/admin/exportAdminList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  // 根据管理员id获取管理员信息
  findAdminById:(data) => request.get('/admin/findAdminById',data),


  //产品列表
  // 分页查询产品类别
  findPageProduct: (data) => request.get('/product/findPage', data),
  // 删除多个产品分类
  deleteProducts: (data) => request.get('/product/deleteBatch', data),
  // 删除某个产品
  deleteProduct: (data) => request.post('/product/delete', data),
  //查询所有产品
  findAllProduct: () => request.get('/product/findAll'),
  // 导出产品信息
  exportProductList: (data) =>
    longRequest({
      url: '/product/exportProductList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //更新产品信息
  updateProduct:(data) => request.post('/product/update',data),
  // 添加一个产品分类
  addProduct: (data) => request.post('/product/save', data),
  // 根据产品id查找产品
  findProduct: (data) => request.post('/product/findOne', data),


  // 产品分类
  // 添加一个产品分类
  addProductCategory: (data) => request.post('/product-category/save', data),
  // 分页查询产品类别
  findPageProductCategory: (data) => request.get('/product-category/findPage', data),
  // 查询全部产品类别
  findAllProductCategory: () => request.get('/product-category/findAll'),
  // 删除某个产品分类
  deleteProductCategory: (data) => request.post('/product-category/delete', data),
  // 删除多个产品分类
  deleteProductCategories: (data) => request.get('/product-category/deleteBatch', data),
  // 获取产品分类中所有创建管理员
  findAdminsInProductCategory: () => request.get('/product-category/findAdminsInProductCategory'),
  // 导出产品分类信息
  exportProductCategoryList: (data) =>
    longRequest({
      url: '/product-category/exportProductCategoryList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //更新产品分类
  updateProductCategory:(data) => request.post('/product-category/update',data),


  //产品属性
  //添加一个产品属性
  addProductAttribute: (data) => request.post('/product-attribute/save', data),
  //分页获取全部产品属性
  findPageProductAttribute: (data) => request.get('/product-attribute/findPage', data),
  // 查询全部产品属性
  findAllProductAttribute: () => request.get('/product-attribute/findAll'),
  //删除某个产品属性
  deleteProductAttribute: (data) => request.post('/product-attribute/delete', data),
  //删除多个产品分类
  deleteProductAttributes: (data) => request.get('/product-attribute/deleteBatch', data),
  // 获取产品属性中所有创建管理员
  findAdminsInProductAttribute: () => request.get('/product-attribute/findAdminsInProductAttribute'),
  // 导出产品属性信息
  exportProductAttributeList: (data) =>
    longRequest({
      url: '/product-attribute/exportProductAttributeList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //更新产品属性
  updateProductAttribute:(data) => request.post('/product-attribute/updateAttribute',data),

  // 产品品牌
  //获取全部产品属性
  findPageProductBrand: (data) => request.get('/product-brand/findPage',data),
  //添加一个产品品牌
  addProductBrand: (data) => request.post('/product-brand/save', data),
  //删除某个产品品牌
  deleteProductBrand: (data) => request.post('/product-brand/delete',data),
  //获取产品品牌中所有创建管理员
  findAdminsInProductBrand: () => request.get('/product-brand/findAdminsInProductBrand'),
  // 删除多个产品分类
  deleteProductBrands: (data) => request.get('/product-brand/deleteBatch', data),
  //更新产品属性
  updateProductBrand:(data) => request.post('/product-brand/update',data),
  // 导出产品品牌信息
  exportProductBrandList: (data) =>
    longRequest({
      url: '/product-brand/exportProductBrandList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  // 查询全部产品品牌
  findAllProductBrand: () => request.get('/product-brand/findAll'),

  //仓库
  //分页查询所有仓库信息
  findPageStore: (data) => request.get('/store/findPage',data),
  //获取所有仓库
  findAllStore: () => request.get('/store/findAll'),
  //添加仓库
  addStore:(data)=>request.post('/store/save',data),
  //删除某个仓库
  deleteStore:(data)=>request.post('/store/delete',data),
  //删除一系列仓库
  deleteStores:(data)=>request.get('/store/deleteBatch',data),
  //导出仓库负责人
  exportStoreList: (data) =>
    longRequest({
      url: '/store/exportStoreList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //修改仓库信息
  updateStore:(data) => request.post('/store/update',data),
  //查找仓库对应的货物
  findStoreCommodityByStoreId:(data) => request.get('/store/findStoreCommodityByStoreId',data),
  // 根据仓库类型获取仓库列表
  findStoreByType:(data) => request.get('/store/findStoreByType',data),
  // 根据仓库id获取仓库信息
  findStoreById:(data) => request.get('/store/findStoreById',data),
  // 获取仓库总数
  storeCount:()=>request.get('/store/count'),



  //仓库货物
  //分页获取仓库货物
  findPageInventory: (data) => request.get('/store-commodity/findPage',data),
  //删除某个仓库货物
  deleteInventory:(data)=>request.post('/store-commodity/delete',data),
  //删除一系列仓库货物
  deleteInventories:(data)=>request.get('/store-commodity/deleteBatch',data),
  //添加某条仓库货物
  addInventory:(data)=>request.post('/store-commodity/save',data),
  //查找所有仓库货物
  findAllInventory: () => request.get('/store-commodity/findAll'),
  //查找仓库货物对应的从仓库
  findStoreByCommodityId:(data) => request.get('/store-commodity/findStoreByCommodityId',data),
  //查找id对应的货物
  findStoreCommodityById:(data) => request.get('/store-commodity/findStoreCommodityById',data),
  //通过产品和仓库id查找库存
  findStoreCommodityByProductAndStoreId:(data) => request.get('/store-commodity/findStoreCommodityByProductAndStoreId',data),
  exportInventoryList: (data) =>
    longRequest({
      url: '/store-commodity/exportStoreCommmodityList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //修改仓库信息
  updateInventory:(data) => request.post('/store-commodity/update',data),
  //查找仓库货物对应的多个仓库
  findStoresByCommodityIds:(data) => request.get('/store-commodity/findStoreByStoreCommodityIds',data),

  //仓库库单
  //添加入库单
  addInboundDocument:(data)=>request.post('/store-receipt/save',data),
  //添加出库单
  addOutboundDocument:(data)=>request.post('/store-receipt/save',data),
  //分页获取所有出库单
  findPageStoreReceipt: (data) => request.get('/store-receipt/findPage',data),
  //删除一系列入库单
  deleteInBoundDocuments:(data)=>request.get('/store-receipt/deleteBatch',data),
  //删除一系列出库单
  deleteOutBoundDocuments:(data)=>request.get('/store-receipt/deleteBatch',data),
  //删除某个入库单
  deleteInBoundDocument:(data)=>request.post('/store-receipt/delete',data),
  //删除某个出库单
  deleteOutBoundDocument:(data)=>request.post('/store-receipt/delete',data),
  //获取采购人员/客户
  findAdminsInboundDocument: () => request.get('/store-receipt/findAdminsInboundDocument'),
  //获取出库单负责人
  findAdminsOutboundDocument: () => request.get('/store-receipt/findAdminsOutboundDocument'),
  //修改出入库单
  updateStoreReceipt:(data) => request.post('/store-receipt/update',data),
  //导出仓库库单
  exportStoreReceiptList: (data) =>
    longRequest({
      url: '/store-receipt/exportStoreReceiptList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  //仓库调拨单
  //分页查询所有调拨单
  findPageStoreTransfer: (data) => request.get('/store-transfer/findPage',data),
  //添加调拨单
  addStoreTransfer:(data)=>request.post('/store-transfer/save',data),
  //修改调拨单
  updateStoreTransfer:(data) => request.post('/store-transfer/update',data),
  //删除一系列调拨单
  deleteStoreTransfers:(data)=>request.get('/store-transfer/deleteBatch',data),
  //删除某个调拨单
  deleteStoreTransfer:(data)=>request.post('/store-transfer/delete',data),
  // 导出调拨单
  exportStoreTransferList: (data) =>
    longRequest({
      url: '/store-transfer/exportStoreTransferList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  // 客户订单
  // 添加客户订单
  addCustomerOrder:(data)=>request.post('/customer-order/save',data),
  // 获取所有客户订单信息
  findPageCustomerOrder: (data) => request.get('/customer-order/findPage', data),
  // 删除某个客户订单
  deleteCustomerOrder:(data)=>request.post('/customer-order/delete',data),
  // 删除一系列客户订单
  deleteCustomerOrders:(data)=>request.get('/customer-order/deleteBatch',data),
  // 修改出客户订单
  updateCustomerOrder:(data) => request.post('/customer-order/update',data),
  // 修改出客户订单状态
  updateCustomerOrderStatus:(data) => request.get('/customer-order/updateStatus',data),
  //导出客户订单
  exportCustomerOrderList: (data) =>
    longRequest({
      url: '/customer-order/exportCustomerOrderList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //查找所有客户订单
  findAllCustomerOrder: () => request.get('/customer-order/findAll'),

  // 数据统计
  // 销售量
  getSaleAmount:()=>request.get('/customer-order/getSaleAmount'),
  // 昨日销售量
  getSaleAmountInYesterday:()=>request.get('/customer-order/getSaleAmountInYesterday'),
  // 近一周销售量
  getSaleAmountInWeek: () => request.get('/customer-order/getSaleAmountInWeek'),
  // 站点销量
  getSaleAmountByNation:(data)=>request.get('/customer-order/getSaleAmountByNation', data),
  // 根据仓库类型获得库存数
  getSaleAmountByStoreType:(data)=>request.get('/customer-order/getSaleAmountByStoreType', data),
  // 获取总的销售额
  getSaleMoney:()=>request.get('/customer-order/getSaleMoney'),
  // 昨日销售额
  getSaleMoneyYesterday:()=>request.get('/customer-order/getSaleMoneyInYesterday'),
  // 获取近一周的销售额
  getSaleMoneyInWeek:()=>request.get('/customer-order/getSaleMoneyInWeek'),
  // 站点销售额
  getSaleMoneyByNation:(data)=>request.get('/customer-order/getSaleMoneyByNation', data),
  // 根据仓库类型获得销售额
  getSaleMoneyByStoreType:(data)=>request.get('/customer-order/getSaleMoneyByStoreType', data),
  // 按照产品大类进行销售统计
  getSaleMoneyByCategory:()=>request.get('/customer-order/getSaleMoneyByCategory'),
  // 按照货物名称进行销售量统计
  getSaleAmountByStoreCommodity:()=>request.get('/customer-order/getSaleAmountByStoreCommodity'),
  // 根据店铺id获取销售额
  getSaleMoneyByShopId:(data)=>request.get('/customer-order/getSaleMoneyByShopId', data),
  // 根据店铺id获取销售量
  getSaleQuantityByShopId:(data)=>request.get('/customer-order/getSaleQuantityByShopId', data),
  // 获取销售利润
  getSaleProfit:()=>request.get('/customer-order/getSaleProfit'),
  // 昨日获取销售利润
  getSaleProfitYesterday:()=>request.get('/customer-order/getSaleProfitInYesterday'),
  // 获取近一周的获取销售利润
  getSaleProfitInWeek:()=>request.get('/customer-order/getSaleProfitInWeek'),
  // 获取站点的销售利率
  getSaleProfitRateByNation:(data)=>request.get('/customer-order/getSaleProfitRateByNation', data),
  // 站点销售利
  getSaleProfitByNation:(data)=>request.get('/customer-order/getSaleProfitByNation', data),
  // 按照客户订单状态获取订单数量
  getOrderQuantityByStatus:()=>request.get('/customer-order/getOrderQuantityByStatus'),


  // 成本价
  getSaleCost:()=>request.get('/finance-receipt/getTotalCost'),
  // 昨日成本价
  getSaleCostYesterday:()=>request.get('/finance-receipt/getTotalCostInYesterday'),
  // 根据type获得对应price
  getPriceByType:(data)=>request.get('/finance-receipt/getPriceByType', data),
  // 根据orderType获得对应price
  getPriceByOrderType:(data)=>request.get('/finance-receipt/getPriceByOrderType', data),
  // 获取近七天成本价（包括物流成本和产品成本）
  getTotalCostInWeek:()=>request.get('/finance-receipt/getTotalCostInWeek'),


  // 物流费
  getLogisticProviderCost:()=>request.get('/logistics-provider-order/getLogisticProviderCost'),
  // 昨日物流费
  getLogisticProviderCostYesterday:()=>request.get('/logistics-provider-order/getLogisticsProviderCostInYesterday'),
  // 昨日已送达订单数
  getLogisticsProviderOrderQuantityInYesterday: () => request.get('/logistics-provider-order/getLogisticsProviderOrderQuantityInYesterday'),
  // 已送达物流订单总数
  getLogisticProviderOrderQuantity: () => request.get('/logistics-provider-order/getLogisticProviderOrderQuantity'),
  // 昨日已送达货物总量
  getLogisticsProviderQuantityInYesterday: () => request.get('/logistics-provider-order/getLogisticsProviderQuantityInYesterday'),
  // 已送达货物总量
  getLogisticProviderOrderCommodityQuantity: () => request.get('/logistics-provider-order/getLogisticProviderOrderCommodityQuantity'),
  // 根据物流商名称获取物流订单数量
  getLogisticProviderOrderQuantityByName: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderQuantityByName', data),
  // 根据物流商名称获取运输货物总量
  getLogisticProviderOrderCommodityQuantityByName: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderCommodityQuantityByName', data),
  // 根据物流渠道获取物流订单运输货物总量
  getLogisticProviderOrderCommodityQuantityByChannel: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderCommodityQuantityByChannel', data),
  // 根据物流渠道获取物流订单总费用
  getLogisticProviderOrderPriceByChannel: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderPriceByChannel', data),
  // 根据物流渠道获取物流订单数量
  getLogisticProviderOrderQuantityByChannel: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderQuantityByChannel', data),
  // 根据物流状态获取物流订单数量
  getLogisticProviderOrderQuantityByStatus: (data) => request.get('/logistics-provider-order/getLogisticProviderOrderQuantityByStatus', data),
  // 根据客户订单获取物流订单
  updateByCustomerId: (data) => request.get('./logistics-provider-order/updateByCustomerId',data),
  // 获取今天的货物总量
  getLogisticsProviderQuantityInToday: () => request.get('/logistics-provider-order/getLogisticsProviderQuantityInToday'),
  // 获取近七个月，每个月今天的物流订单总数
  getLogisticsProviderOrderQuantityInMonthToday: () => request.get('/logistics-provider-order/getLogisticsProviderOrderQuantityInMonthToday'),
  // 获取近七个月，每个月总的物流订单总数
  getLogisticsProviderOrderQuantityInMonth: () => request.get('/logistics-provider-order/getLogisticsProviderOrderQuantityInMonth'),
  // 获取近一年，每个月总的物流订单总数
  getLogisticsProviderOrderQuantityInYear: () => request.get('/logistics-provider-order/getLogisticsProviderOrderQuantityInYear'),
  // 获取今天的物流费
  getLogisticsProviderCostInToday: () => request.get('/logistics-provider-order/getLogisticsProviderCostInToday'),
  // 获取近七天物流费
  getLogisticsProviderCostInWeek: () => request.get('/logistics-provider-order/getLogisticsProviderCostInWeek'),
  // 获取近七个月，每个月今天的物流费
  getLogisticsProviderCostInMonthToday: () => request.get('/logistics-provider-order/getLogisticsProviderCostInMonthToday'),
  // 获取近七个月，每个月总的物流费
  getLogisticsProviderCostInMonth: () => request.get('/logistics-provider-order/getLogisticsProviderCostInMonth'),
  // 获取近一年，每个月总的物流费
  getLogisticsProviderCostInYear: () => request.get('/logistics-provider-order/getLogisticsProviderCostInYear'),
  // 根据物流状态获取货物数量
  findCommoditiesByStatus: (data) => request.get('/logistics-provider-order/findCommoditiesByStatus', data),

  // 获取在物流订单中的所有物流商
  getLogisticsProviderInOrder:()=>request.get('/logistics-provider/getLogisticsProviderInOrder'),

  //获取客户国籍
  getNation:()=>request.get('/customer/getAllNation'),
  getCustomerCountByNation:(data)=>request.get('/customer/getCustomerCountByNation', data),

  //根据仓库类型获取正常的货物个数
  findNormalCountByType:(data)=>request.get('/store-commodity/findNormalCountByType', data),
  //根据仓库类型获取缺货的货物个数
  findLackCountByType:(data)=>request.get('/store-commodity/findLackCountByType', data),
  //根据仓库类型获取断货的货物个数
  findEmptyCountByType:(data)=>request.get('/store-commodity/findEmptyCountByType', data),

  //根据仓库类型获取仓库数量
  getStoreCountByType:()=>request.get('/store/getStoreCountByType'),

  //获取客户订单中涉及到的所有店铺
  getShopsInCustomerOrder:()=>request.get('/shop/getShopsInCustomerOrder'),

  //根据仓库类型获得期望库存数
  findStoreMinimumCommodityByType:(data)=>request.get('/store-commodity/findStoreMinimumCommodityByType', data),
  //根据仓库类型获得货物大类总数
  findCategoryCountByType:(data)=>request.get('/store-commodity/findCategoryCountByType', data),
  //根据货物状态获得货物个数
  findStoreCommodityCountByStatus:(data)=>request.get('/store-commodity/findStoreCommodityCountByStatus', data),
  //获取所有仓库货物数量
  findAllCommodities:()=>request.get('/store-commodity/findAllCommodities'),
  //根据仓库类型查询仓库货物量
  findStoreCommodityByType:(data)=>request.get('/store-commodity/findStoreCommodityByType', data),
  //获取所有仓库货物种类数
  findAllCommoditiy:()=>request.get('/store-commodity/findAllCommoditiy'),
  //查询产品对应的多个仓库
  findStoreByStoreCommodityIds:(data)=>request.get('/store-commodity/findStoreByStoreCommodityIds', data),

  // 评价
  // 获取评价总数
  getReviewCount:() => request.get('/review/count'),
  // 获取今日评价数
  getReviewCountToday:() => request.get('/review/countToday'),
  // 获取1-3星级评价数
  getOneToThreeReviewCount:() => request.get('/review/countOneToThree'),
  // 获取4-5星级评价数
  getFourToFiveReviewCount:() => request.get('/review/countFourToFive'),

  //客户
  //分页获取所有客户信息
  findPageCustomer: (data) => request.get('/customer/findPage',data),
  //获取所有客户信息
  findAllCustomer:()=>request.get('/customer/findAll'),
  //导出客户信息
  exportCustomerList: (data) =>
    longRequest({
      url: '/customer/exportCustomerList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //添加客户
  addCustomer:(data)=>request.post('/customer/save',data),
  //删除某个客户
  deleteCustomer:(data)=>request.post('/customer/delete',data),
  //删除一系列客户
  deleteCustomers:(data)=>request.get('/customer/deleteBatch',data),
  //修改出入库单
  updateCustomer:(data) => request.post('/customer/update',data),

  //物流商
  // 获取物流商总数
  logisticsProviderCount: ()=>request.get('/logistics-provider/count'),
  //分页获取所有物流商信息
  findPageLogisticsProvider: (data)=>request.get('/logistics-provider/findPage',data),
  //获取所有物流商信息
  findAllLogisticsProvider:()=>request.get('/logistics-provider/findAll'),
  //添加物流商
  addLogisticsProvider:(data) => request.post('/logistics-provider/save', data),
  //删除某个物流商
  deleteLogisticsProvider:(data)=>request.post('/logistics-provider/delete',data),
  //删除一系列物流商
  deleteLogisticsProviders:(data) => request.get('/logistics-provider/deleteBatch', data),
  //导出物流商信息
  exportLogisticsProviderList: (data) =>
    longRequest({
      url: '/logistics-provider/exportLogisticsProviderList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //更新物流商信息
  updateLogisticsProvider:(data) => request.post('/logistics-provider/update',data),

  //物流订单
  //添加物流订单
  addLogisticsProviderOrder:(data)=>request.post('/logistics-provider-order/save',data),
  //获取所有物流订单
  findAllLogisticsProviderOrder:(data)=>request.get('/logistics-provider-order/findAll',data),
  //删除某个物流订单
  deleteLogisticsProviderOrder:(data)=>request.post('/logistics-provider-order/delete',data),
  //删除一系列物流订单
  deleteLogisticsProviderOrders:(data) => request.get('/logistics-provider-order/deleteBatch', data),
  //修改物流订单
  updateLogisticsProviderOrder:(data) => request.post('/logistics-provider-order/update',data),
  //分页获取所有物流订单
  findPageLogisticsProviderOrder:(data)=>request.get('/logistics-provider-order/findPage',data),
  //导出物流订单
  exportLogisticsOrderList: (data) =>
    longRequest({
      url: '/logistics-provider-order/exportLogisticsProviderOrderList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  //供应商
  //添加供应商
  addSupplier:(data)=>request.post('/supplier/save',data),
  //获取所有供应商
  findAllSupplier:(data)=>request.get('/supplier/findAll',data),
  //删除某个供应商
  deleteSupplier:(data)=>request.post('/supplier/delete',data),
  //删除一系列供应商
  deleteSuppliers:(data) => request.get('/supplier/deleteBatch', data),
  //分页获取所有供应商
  findPageSupplier:(data)=>request.get('/supplier/findPage',data),
  //编辑供应商
  updateSupplier:(data) => request.post('/supplier/update',data),
  //导出采购订单
  exportSupplierList: (data) =>
    longRequest({
      url: '/supplier/exportSupplierList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  //采购计划
  //分页获取所有采购计划
  findPagePurchasePlan:(data)=>request.get('/purchase-plan/findPage',data),
  //添加采购计划
  addPurchasePlan:(data)=>request.post('/purchase-plan/save',data),
  //删除某个采购计划
  deletePurchasePlan:(data)=>request.post('/purchase-plan/delete',data),
  //删除一系列采购计划
  deletePurchasePlans:(data) => request.get('/purchase-plan/deleteBatch', data),
  //修改出入库单
  updatePurchasePlan:(data) => request.post('/purchase-plan/update',data),
  //导出采购计划
  exportPurchasePlanList: (data) =>
    longRequest({
      url: '/purchase-plan/exportPurchasePlanList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  // 促销活动
  // 分页获取所有促销活动
  findPageSalePromotionActivity:(data)=>request.get('/sale-promotion/findPage',data),
  //添加促销活动
  addSalePromotionActivity:(data)=>request.post('/sale-promotion/save',data),
  //删除促销活动
  deleteSalePromotionActivity:(data)=>request.post('/sale-promotion/delete',data),
  //删除一系列促销活动
  deleteSalePromotionActivities:(data)=>request.get('/sale-promotion/deleteBatch',data),
  //修改促销活动
  updateSalePromotionActivity:(data) => request.post('/sale-promotion/update',data),
  //获取所有促销活动
  findAllSalePromotionActivities:()=>request.get('/sale-promotion/findAll'),
  //导出采购计划
  exportSalePromotionActivities:(data) =>
    longRequest({
      url: '/sale-promotion//exportSalePromotionList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  // 货币
  // 分页获取所有货币
  findPageCurrency:(data)=>request.get('/currency/findPage',data),
  //添加货币
  addCurrency:(data)=>request.post('/currency/save',data),
  //删除某个货币
  deleteCurrency:(data)=>request.post('/currency/delete',data),
  //删除一系列货币
  deleteCurrencies:(data)=>request.get('/currency/deleteBatch',data),
  //获取所有货币
  findAllCurrency:()=>request.get('/currency/findAll'),
  //修改汇率
  updateCurrency:(data) => request.post('/currency/update',data),

  // 操作日志
  // 分页获取所有操作日志
  findPageLog:(data)=>request.get('/log/findPage',data),
  //添加操作日志
  addLog:(data)=>request.post('/log/save',data),
  //删除某个操作日志
  deleteLog:(data)=>request.post('/log/delete',data),
  //删除一系列操作日志
  deleteLogs:(data)=>request.get('/log/deleteBatch',data),
  //获取所有操作日志
  findAllLog:()=>request.get('/log/findAll'),
  //导出采购计划
  exportLog:(data) =>
    longRequest({
      url: '/log/exportLogList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),

  // 店铺
  // 分页获取所有店铺
  findPageShop:(data)=>request.get('/shop/findPage',data),
  //添加店铺
  addShop:(data)=>request.post('/shop/save',data),
  //删除某个店铺
  deleteShop:(data)=>request.post('/shop/delete',data),
  //删除一系列店铺
  deleteShops:(data)=>request.get('/shop/deleteBatch',data),
  //编辑店铺
  updateShop:(data) => request.post('/shop/update',data),
  //获取所有店铺
  findAllShop:()=>request.get('/shop/findAll'),
  // 获取店铺总数
  shopCount:()=>request.get('/shop/count'),



  //采购单
  //分页获取所有采购单
  findPagePurchaseOrder:(data)=>request.get('/purchase-order/findPage',data),
  //添加采购单
  addPurchaseOrder:(data)=>request.post('/purchase-order/save',data),
  //删除某个采购单
  deletePurchaseOrder:(data)=>request.post('/purchase-order/delete',data),
  //删除一系列采购单
  deletePurchaseOrders:(data)=>request.get('/purchase-order/deleteBatch',data),
  //获取所有采购单
  findAllPurchaseOrder:()=>request.get('/purchase-order/findAll'),
  //编辑采购单
  updatePurchaseOrder:(data) => request.post('/purchase-order/update',data),
  //导出采购订单
  exportPurchaseDocumentList: (data) =>
    longRequest({
      url: '/purchase-order/exportPurchasrOrderList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //获取联系人
  findAdminsInPurchaseOrder:()=>request.get('/purchase-order/findAdminsInPurchaseOrder'),

  // 角色
  //添加角色
  addRole: (data) => request.post('/role/save', data),
  //获取所有角色
  findAllRole:()=>request.get('/role/findAll'),
  // 查找角色
  findNameByAuthority: (data) => request.get('/role/findNameByAuthority', data),
  // 获取角色总数
  roleCount:()=>request.get('/role/count'),

  //入款单
  //分页获取所有财务单据
  findPageFinance:(data)=>request.get('/finance-receipt/findPage',data),
  //导出财务单据
  exportFinanceReceiptList: (data) =>
    longRequest({
      url: '/finance-receipt/exportFinanceReceiptList',
      method: 'get',
      responseType: 'blob',
      params: data,
    }),
  //添加财务款单
  addFinanceReceipt:(data)=>request.post('/finance-receipt/save',data),
  //删除某个财务单据
  deleteFinanceReceipt:(data)=>request.post('/finance-receipt/delete',data),
  //删除一系列财务单据
  deleteFinanceReceipts:(data)=>request.get('/finance-receipt/deleteBatch',data),
  //编辑财务单据
  updateFinanceReceipt:(data) => request.post('/finance-receipt/update',data),

  //评价
  //分页获取所有财务单据
  findPageReview:(data)=>request.get('/review/findPage',data),
  addReview:(data)=>request.post('/review/save',data),
  //删除某个财务单据
  deleteReview:(data)=>request.post('/review/delete',data),
  //删除一系列财务单据
  deleteReviews:(data)=>request.get('/review/deleteBatch',data),
  findReviewsByProductId:(data)=>request.get('/review/findReviewsByProductId',data),
  findAllReview:(data)=>request.get('/review/findAll',data),


  // 翻译API
  translateService:(data) => longRequest.get('/chat-bot/translate',data),
  generateService:(data) => longRequest.get('/chat-bot/generate',data),
  optimizeService:(data) => longRequest.get('/chat-bot/optimize',data),

  //文件上传与下载
  // 文件上传
  uploadFile:(data) => request.post('/common/upload', data, {
      headers: {
        'Content-Type': 'multipart/form-data',
      },
    }),
  // 文件下载
  downloadFile:(data)=>request.get('/common/download',data),
}
